package com.lh0811.forge.pserv.uacs.api.param;

import com.lh0811.forge.pserv.uacs.api.constant.UacsContant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * 开发平台-平台用户表
 *
 * @author
 * @email
 * @date 2024-05-12 21:16:21
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class UacsPlateUserCreateParam implements Serializable {

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @NotBlank(message = "手机号不能为空")
    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String phone;

    @Schema(description = "昵称")
    private String nickName;

    @NotBlank(message = "密码不能为空")
    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String password;

    @NotBlank(message = "确认密码不能为空")
    @Schema(description = "确认密码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String repwd;

    @Schema(description = "真实姓名")
    private String realName;

    @Pattern(regexp = "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$", message = "日期格式应为yyyy-MM-dd")
    @Schema(description = "生日 yyyy-MM-dd")
    private String birthday;

    @Pattern(regexp = "^(?:00|01|02)$", message = "性别入参不合法  00-保密 01-男 02-女")
    @Schema(description = "性别： 00-保密 01-男 02-女")
    private String gender = UacsContant.Gender.保密.getCode();

    @Schema(description = "是否可用")
    private Boolean activeFlag = Boolean.TRUE;

    @Schema(description = "是否注销")
    private Boolean writeOffFlag = Boolean.FALSE;

    @Schema(description = "备注")
    private String notes;

}
